package com.ryskoo.customer.vendormanager.domain;

import com.ryskoo.common.dto.permission.RoleDTO;
import com.ryskoo.common.hclconstant.EmployeeTypeEnum;
import com.ryskoo.framework.core.bean.BasicPO;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * 商户员工表
 * @author Shawn
 */
@Entity
@Table(name = "CUS_VENDOR_MANAGER")
public class VendorManagerPO extends BasicPO {
	
	private static final long serialVersionUID = -3889983146564775832L;
	
	/**
	 * 登录帐号
	 */
	@Column(name = "login_name", length = 20)
	private String loginName;
	
	/**
	 * 管理员密码
	 */
	@Column(name = "password", length = 40)
	private String password;
	
	/**
	 * 管理员姓名
	 */
	@Column(name = "name", length = 24)
	private String name;
	
	/** 商户主表uuid */
    @Column(name = "vendor_uuid", length = 32)
    private String vendorUuid;
	
    /**
	 * 状态
	 */
	@Column(name = "state", columnDefinition = "bit", length = 1)
	private boolean state = false;
	
	/**
	 * 身份
	 */
	@Column(name = "identity", length = 10)
	private String identity;
	
	/**
	 * 职位
	 */
	@Column(name = "position", length = 10)
	private String position;
	
	/**
	 * 手机号
	 */
	@Column(name = "mobile", length = 20)
	private String mobile;
	
	/**
	 * 邮箱
	 */
	@Column(name = "email", length = 40)
	private String email;
	
	/**
	 * QQ
	 */
	@Column(name = "qq", columnDefinition = "varchar",length = 12)
	private Integer qq;
	
	/**
	 * 备注
	 */
	@Column(name = "description", length = 100)
	private String description;
	
	/**
	 * 部门uuid
	 */
	@Column(name = "dept_id", length = 32)
	private String deptId;
	
	/**
	 * 是否超级管理员
	 */
	@Column(name = "super_manager", columnDefinition = "bit", length = 1, nullable = false)
	private boolean superManager = false;

	/**
	 * 员工类型
	 */
	@Column(name = "employee_type", columnDefinition = "tinyint", length = 2)
	private int employeeType = EmployeeTypeEnum.WAITER.getValue();

	/**
	 * 是否接收消息推送，只有员工类型为老板的时候才可以接收消息推送
	 */
	@Column(name = "is_receive_notification")
	private boolean receiveNotification = false;
	
	/**
	 * 管理员关联的角色列表，非持久化属性
	 */
	@Transient
	private List<RoleDTO> roleList;

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


	public boolean isState() {
		return state;
	}

	public void setState(boolean state) {
		this.state = state;
	}

	public boolean isSuperManager() {
		return superManager;
	}

	public void setSuperManager(boolean superManager) {
		this.superManager = superManager;
	}

	public String getIdentity() {
		return identity;
	}

	public void setIdentity(String identity) {
		this.identity = identity;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Integer getQq() {
		return qq;
	}

	public void setQq(Integer qq) {
		this.qq = qq;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public List<RoleDTO> getRoleList() {
		return roleList;
	}

	public void setRoleList(List<RoleDTO> roleList) {
		this.roleList = roleList;
	}

	public String getVendorUuid() {
		return vendorUuid;
	}

	public void setVendorUuid(String vendorUuid) {
		this.vendorUuid = vendorUuid;
	}

	public int getEmployeeType() {
		return employeeType;
	}

	public void setEmployeeType(int employeeType) {
		this.employeeType = employeeType;
	}

	public boolean isReceiveNotification() {
		return receiveNotification;
	}

	public void setReceiveNotification(boolean receiveNotification) {
		this.receiveNotification = receiveNotification;
	}

	@Override
	public String toString() {
		return "VendorManagerPO [loginName=" + loginName + ", password="
				+ password + ", name=" + name + ", vendorUuid=" + vendorUuid
				+ ", state=" + state + ", identity=" + identity + ", position="
				+ position + ", mobile=" + mobile + ", email=" + email
				+ ", qq=" + qq + ", description=" + description + ", deptId="
				+ deptId + ", superManager=" + superManager + ", employeeType="
				+ employeeType + ", receiveNotification=" + receiveNotification
				+ ", roleList=" + roleList + "]";
	}
	
	
}
